﻿using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

/// <summary>
/// Summary description for Connection
/// </summary>
public class ConnectionDB
{
    public static SqlConnection GetConnection()
    {
      //  SqlConnection cn = new SqlConnection("Data Source=lanhdaitourist.com;initial catalog=lanhdaitourist; user id=tkg2013; password=Admin123");
        SqlConnection cn = new SqlConnection("Data Source=lanhdaitourist.com;initial catalog=lanhdaitourist; user id=tkg2013; password=Admin123");
        if (cn.State != ConnectionState.Closed)
        {
            cn.Close();
            cn.Dispose();
        }
        return cn;
    }

    //public static SqlConnection GetConnection()
    //{
    //    SqlConnection cn = new SqlConnection("Data Source=210.245.86.49;initial catalog=cvaunieduvn_vankhoi; user id=cvaunieduvn_vankhoi3; password=13071990");
    //    if (cn.State != ConnectionState.Closed)
    //    {
    //        cn.Close();
    //        cn.Dispose();
    //    }
    //    return cn;
    //}
}
